<?php
if(!defined('BZ_XTBLOG') || !defined('BZ_WJSCUZ')) {
	exit('Access Denied');
}
########################################
//短信注册
########################################
$sms=$_REQUEST['sms'];
$mobi=$_REQUEST['mobile'];
$namem=$_REQUEST['name'];
$pass=$_REQUEST['pass'];
$xtpass=$_REQUEST['order'];
$addressa=$_REQUEST['addressa'];
$addressb=$_REQUEST['addressb'];
if(empty($namem) or empty($pass) or empty($mobi) or empty($xtpass)){
		 echo '3';
}else if($xtpass != Bingz_config('user_config_reg_sms_pass')){
		 echo '4';
}else if('1' != Bingz_config('user_config_reg') && $sms == Bingz_config('user_config_reg_sms_zlm')){
		 echo '5';
}else if($sms == Bingz_config('user_config_reg_sms_zlm')){
      if($userhy=$db->get_one('user' ," `mobile` = '$mobi' ")){
         $user_class->user_password($userhy[uid],$pass,'你好！您用手机号重置账号密码，密码为手机号后6位！');
         echo '2';
      }else{
		     $ts=$user_class->user_reg($namem,$mobi,$mobi.'@139.com',$pass,'1');
         if($ts >'0'){
      	    echo '1';
		     }else{
		        echo '3';
		     }
      }
}else if($sms == Bingz_config('user_config_reg_sjrz_yzm')){
      if($userhy=$db->get_one('user' ," `mobile` = '$mobi' and `mobile_d` = '0' ")){
		     $db->update('user',array( 'mobile_d' => 1 ),"`uid` = '$userhy[uid]'");
         Bingz_message_post('0',$userhy[uid],"恭喜你！你提交的手机号认证成功！");
		     echo '7';
	    }elseif($db->get_one('user' ," `mobile` = '$mobi' and `mobile_d` = '1' ")){
   		   echo '8';
	    }else{
		     echo '9';
	    }
}else{
	  echo '3';
}
?>